package com.tangpian.framework.repository;

import java.io.Serializable;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.tangpian.framework.entity.User;

@Repository
public interface UserDao extends PagingAndSortingRepository<User, Serializable>  {
	@Query("from User u where u.account.username = :loginName")
	User findUserByUsername(@Param("loginName") String username);
}
